/*
* $Id: HousingManagerDialog.h 166 2010-10-15 22:19:32Z volok-aleksej@yandex.ru $
*
* Copyright 2009 by Alexey Volokitin
* All rights reserved
*
*/
#ifndef _HOUSING_MANAGER_DIALOG_H_
#define _HOUSING_MANAGER_DIALOG_H_

class CHousingManagerDialog : public CDialog
{
	CButton m_addH;
	CButton m_changeH;
	CButton m_delH;
	CButton m_addF;
	CButton m_delF;
	CListBox m_listH;
	CTreeCtrl m_treeH;
	CEdit m_nameH;
private:
	int m_nIdInfoHousing;
	std::map<int, HTREEITEM> m_aItems;
	HTREEITEM m_hSelItem;
protected:
	void SetButtonsState();
	void SetHousingInfo(int nId);
	void ExpandTree(HTREEITEM& item);
	void CollapseTree(HTREEITEM item, HTREEITEM newItem);
protected:
	DECLARE_MESSAGE_MAP();
	afx_msg void OnAddHouse();
	afx_msg void OnChangeHouse();
	afx_msg void OnChangeName();
	afx_msg void OnDeleteHouse();
	afx_msg void OnAddFamily();
	afx_msg void OnDeleteFamily();
	afx_msg void OnSelChange();
	afx_msg void OnSelChange(NMHDR* nmhdr, LRESULT* pResult);
	virtual BOOL OnInitDialog();
	virtual void DoDataExchange(CDataExchange* pDX);
public:
	CHousingManagerDialog(CWnd* pParent);
	virtual ~CHousingManagerDialog();
public:
};

#endif/*_HOUSING_MANAGER_DIALOG_H_*/